package com.sxl.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName askers
 */
@TableName(value ="askers")
@Data
public class Askers implements Serializable {
    /**
     * 
     */
    @TableField(value = "askerId")
    private Integer askerId;

    /**
     * 用户name
     */
    @TableField(value = "askerName")
    private String askerName;

    /**
     * 权重（给学生分配咨询师的权重）
     */
    @TableField(value = "weight")
    private Integer weight;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Askers other = (Askers) that;
        return (this.getAskerId() == null ? other.getAskerId() == null : this.getAskerId().equals(other.getAskerId()))
            && (this.getAskerName() == null ? other.getAskerName() == null : this.getAskerName().equals(other.getAskerName()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAskerId() == null) ? 0 : getAskerId().hashCode());
        result = prime * result + ((getAskerName() == null) ? 0 : getAskerName().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", askerId=").append(askerId);
        sb.append(", askerName=").append(askerName);
        sb.append(", weight=").append(weight);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}